<template>
  <div class='target-click'>
    <span class='target-click'>{{ele.text}}</span>
    <span class='right-input' @click.stop=''>行数：<a-input-number class='input target-click' :min="1" size='small' :max="10" v-model='defaultVal' @change="onChange" /></span>
  </div>
</template>
<script>
export default {
  props: {
    showFlag: {
      type: Boolean,
      default: false
    },
    ele: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      defaultVal: 1
    }
  },
  watch: {
    showFlag: {
      handler(n) {
        if (n)
          this.defaultVal = 1
      },
      deep: true
    }
  },
  methods: {
    onChange(value) {
      this.$emit('inputBack',value)
    }
  }
}
</script>
<style scope>
.right-input{
  float: right
}
.input {
  width: 40px
}
</style>